#include "LexicalParser.h"


CLexicalParser::CLexicalParser(void)
{
}


CLexicalParser::~CLexicalParser(void)
{
}

bool CLexicalParser::ParseCmd(WnString command, COMMAND& curCommand)
{
	WnString objName;
	WnString cmd;

	if(command.find("-") != WnString::npos)
	{
		objName = command.substr(command.find_last_of("-")+1);
		cmd = command.substr(0, command.find_last_of("-"));
	}
	else
		cmd = command;

	m_command.group = curCommand.group;
	m_command.command = cmd;
	m_command.objName = objName;
	curCommand = m_command;
	return true;
}
